package Chat.Donnees;

/**
 * Message Hello envoyé à la connexion
 *
 * @author Ndanja & Papa Abdou
 */
public class Hello extends Message {

    private Boolean requestRequired;

    /**
     * @param srcContact: L'expéditeur
     * @param requestRequired: Réponse utile ou pas.
     */
    public Hello(Contact srcContact, Boolean requestRequired) {
        super(srcContact);
        this.requestRequired = requestRequired;
    }

    /**
     * Paramétrer l'état de la réponse
     * @param replyRequired
     */
    public void setRequestRequired(Boolean replyRequired) {
        this.requestRequired = replyRequired;
    }

    /**
     *
     * @return: Etat du replyRequired
     */
    public Boolean isReplyRequired() {
        return this.requestRequired;
    }

    @Override
    public String toString() {
        return "Hello/" + super.toString();
    }
}

